<?php
/* P3(c)

******************************************************************************
                                                                                      
                         __                                                        
                        /__)                                                       
                       /__        P3 - moving Technologie            
                        __)                                                          
                        __)                                                          
                                                                                        
                                                                                        
       Copyright 2009 by p3.co.at                                                                                 
                                                                                        
       visit www.p3.co.at to get more Informations 
       about Teriko - Betriebsdatenerfassung                                                                                 
       - it's not allowed to change this scripts
       - it's not allowed to remove this copyright-tag

       -- you can download the complete license   
          under http://www.teriko.org

 (c) by Patrik Pfaffenbauer and P3 (http://www.p3.co.at)

 | Programname: P3.Teriko
 | Authtor: P3.Verein
 | Coder: Patrik Pfaffenbauer
 | Version: 0.1

 | Change Index
 |_____________________________________________
 |                                             |
 |24.03.2010 Erstellung | Patrik Pfaffenbauer  |
 |_____________________________________________|

******************************************************************************

P3(c) */

class LanguageHelper
{
	var $langCount;
	var $langJavaCount;
	var $langReportCount;
	
	function LanguageHelper()
	{
		
	}
	
	function GetLanguage($module, $name)
	{
		$this->langCount++;
		
		$xml = simplexml_load_file('./lang/de-de.xml');
		return $xml->{"Teriko-Modules"}->{$module}->{$name};
	}
	
	function GetReportLanguage($module, $name)
	{
		$this->langReportCount++;
		
		$xml = simplexml_load_file('../../lang/de-de.xml');
		return $xml->{"Teriko-Modules"}->{$module}->{$name};
	}
	function GetJavaLanguage($module, $name)
	{
		$this->langJavaCount++;
		
		$xml = simplexml_load_file('../../lang/de-de.xml');
		return $xml->{"Teriko-Modules"}->{$module}->{$name};
	}
}

function GetSmartyLanguage($params, &$smarty)
{
	$xml = simplexml_load_file('./lang/de-de.xml');
		
	if($params["modul"] == "" || $params["name"] == "")
		return "";
	
	return $xml->{"Teriko-Modules"}->{$params["modul"]}->{$params["name"]};
}
?>